#ifndef DUOP_MAIN_WINDOW_H
#define DUOP_MAIN_WINDOW_H

#include <QWidget>
#include <QtGui>
#include "duopl_titlebar.h"
#include "duopl_toolbar.h"
#include "duopl_contentwidget.h"
#include "duopl_statusbar.h"


enum enum_Direction{
    eNone,
    eTop,
    eBottom,
    eRight,
    eLeft,
    eTopRight,
    eBottomLeft,
    eRightBottom,
    eLeftTop,

};

class duopl_main_window : public QFrame
{

     Q_OBJECT
public:
    duopl_main_window();
    void paintEvent(QPaintEvent *event);


signals:

public slots:
    void title_bar_slots();

private:

    duopl_titlebar *duopl_pTitleBar;//=new duopl_titlebar(this);
    duopl_toolbar *duopl_pToolBar;
    duopl_contentWidget *duopl_pContentWidget;
    duopl_statusbar *duopl_pStatusBar;
    QVBoxLayout *duopl_pMainLayout;

    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void mouseDoubleClickEvent(QMouseEvent *event);
    void SetCursorStyle(enum_Direction direction);
    void SetDrayMove(int nXGlobal,int nYGlobal,enum_Direction direction);
    enum_Direction PointValid(int x,int y);

    QPoint m_ptPressGlobal;
    QRect m_rectRestoreWindow;
    bool m_bLeftBtnPress;
    bool m_bMaxWin;
    enum_Direction m_eDirection;


};

#endif // DUOP_MAIN_WINDOW_H
